import {ConnectionOptions} from "mysql2/typings/mysql/lib/Connection";

interface IConfigType {
  db:ConnectionOptions,
  log:{
    appenders:Record<string, any>,
    categories:Record<string, any>,
  },
  server:{
    host:string,
    port:number,
  }
}
const config:IConfigType ={
  db:{
    host:'127.0.0.1',
    password:'123456',
    user:'root',
    port:3306,
    database:'node_db',
  },
  log: {
    appenders: {
      cheese: {type: "file", filename: "logs/cheese.log"},
      access: {type: "file", filename: "logs/access.log"},
      db: {type: "file", filename: "logs/db.log"}
    },
    categories: {
      default: {appenders: ["cheese"], level: "info"},
      access: {appenders: ["access"], level: "info"},
      db: {appenders: ["db"], level: "info"},
    }
  },
  server:{
    host: '192.168.0.87',
    port: 8081,
  }
}
export default config;